<?php //pack11class

class MainMenuItem extends Module {

    const  BUTTON_STATE=" onClick=\"location.href='?state={link}';\" onMouseOver=\"javascript:MainMenuHighLight('{id}',true);\" onMouseOut=\"javascript:MainMenuHighLight('{id}',false)\"";

    public $link;
    public $label;
    public $width;
    public $over;
    public $clicked;
    public $mouseover="";

	public function setup() {}

    public function setLink($label,$query=null) {
        $this->label=$label;
        if(is_null($query)) {
            $this->link="";
            $this->over=' style=display:block;';
            $this->clicked="Current";
        } else {
            $urlString=str_replace("{link}", $query, self::BUTTON_STATE);
            $this->link=str_replace("{id}", $this->id, $urlString);
            $this->over="";
            $this->clicked="";
            $this->mouseover="Active";
        }
    }

}
?>

